//
// Created by 14590 on 25-9-2.
//

#include "homepage.h"


void DispHomePage() {
    LCD_SetTextFont(&CH_Font24);			// 设置2424中文字体,ASCII字体对应为2412
    LCD_SetColor(LCD_BLACK);				// 设置画笔颜色
    LCD_SetBackColor(LCD_WHITE);
    LCD_DisplayText(60, 0,"RoboMaster");
    LCD_DisplayText(72,32,"XJTU DX");
    LCD_DisplayText(24,64,"DART Debug Tool");
    LCD_SetTextFont(&CH_Font16);
    LCD_DisplayText(12,300,"Press Any to Continue...");
    LCD_SetTextFont(&CH_Font24);
    LCD_DrawImage(10,100,199,200, gImage_DX);
}

void KeyHomePage() {
    if (Key_F1_Down) {
        PageType = syscfg;
        osSemaphoreRelease(PageSwSemBinaryHandle);
    }
    else if (Key_F2_Down) {
        PageType = paraset;
        osSemaphoreRelease(PageSwSemBinaryHandle);
    }
    else if (Key_F3_Down) {
        PageType = calimode;
        osSemaphoreRelease(PageSwSemBinaryHandle);
    }
    else if (Key_F4_Down) {
        PageType = compmode;
        osSemaphoreRelease(PageSwSemBinaryHandle);
    }
    else if (Key_All_Down){
        PageType = menu;
        osSemaphoreRelease(PageSwSemBinaryHandle);
    }
}